{% extends 'temp.html' %}
{% block type %}
   <div class="bs-example" data-example-id="panel-without-body-with-table">
                    <div class="panel panel-default">
                       <a class="btn btn-info" href="/admin/add/" target="_blank" style="margin: 10px 10px;">
                            <span class="glyphicon glyphicon-plus-sign" aria-hidden="true"></span>
                            新建管理员账户
                       </a>
                       <div style="float:right;width:300px;margin: 10px 10px;">
                            <form method="get">
                                <div class="input-group">
                                     <input type="text" name="q" class="form-control" placeholder="搜索用户" value="{{seach_list}}">
                                     <span class="input-group-btn">
                                        <button class="btn btn-default" type="submit">
                                                <span class="glyphicon glyphicon-search" aria-hidden="true"></span>
                                        </button>
                                     </span>
                                </div>
                            </form>
                       </div>
                        <div class="panel-heading">
                            <h3>管理员账户</h3>
                        </div>
                        <table class="table">
                            <thead>
                                <tr class="success">
                                    <th>ID</th>
                                    <th>头像</th>
                                    <th>用户名</th>
                                    <th>密码</th>
                                    <th>重置密码</th>
                                    <th>操作</th>
                                </tr>
                            </thead>
                            <tbody>
                              {% for i in dict_list %}
                                <tr>
                                    <th scope="row">{{ i.id }}</th>
                                    <td>
                                        <img src="http://127.0.0.1:8000/media/{{ i.img }}" style="height: 48px;width: 48px;">
                                    </td>
                                    <td>{{ i.user_n }}</td>
                                    <td>{{ i.password }}</td>
                                    <td>
                                        <a href="/admin/{{ i.id }}/clear/">重置密码</a>
                                    </td>
                                    <td>
                                        <a class="btn-primary btn-xs" href="/admin/{{ i.id }}/edit/">编辑</a>
                                        <a class="btn-danger btn-xs" href="/admin/{{ i.id }}/delete/">删除</a>
                                    </td>

                                </tr>
                              {% endfor %}

                            </tbody>
                        </table>
                    </div>
               <ul class="pagination" style="margin: 10px 254px;position: relative;top: 0;left: 15%;">
                 {{ page_string }}
               </ul>
            </div>
{% endblock %}